package com.quantdo.action;

import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;

import com.quantdo.service.TomcatManageDao;
import com.quantdo.ui.TomcatManageUiPart;

public class TmTestAction extends MouseAdapter{
	private TomcatManageUiPart manageUiPart;
	public TmTestAction(TomcatManageUiPart manageUiPart){
		this.manageUiPart = manageUiPart;
	}
	@Override
	public void mouseUp(MouseEvent e) {
		System.out.println("aaaaaaaaaaaaaaaaaaaa");
		System.out.println(TomcatManageDao.existsSession(manageUiPart.getServerip().getText()
				, manageUiPart.getUsername().getText()
				, manageUiPart.getPassword().getText()));
		manageUiPart.getConsoleLog().append(String.format("连接测试%s\n", TomcatManageDao.existsSession(manageUiPart.getServerip().getText()
				, manageUiPart.getUsername().getText()
				, manageUiPart.getPassword().getText())?"成功":"失败"));
		super.mouseUp(e);
	}


}
